﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class Site_Header : System.Web.UI.UserControl
{
    public new BaseSitePage Page
    {
        get { return base.Page as BaseSitePage; }
    }

    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            DataBind();
        }
    }

    public override void DataBind()
    {
        lblSiteTitle.Text = Page.Site.Name;
        if (Page.Request.AppRelativeCurrentExecutionFilePath.ToLower().EndsWith("default.aspx"))
        {
            tabs.SelectedIndex = 0;
        }
        else if (Page.Request.AppRelativeCurrentExecutionFilePath.ToLower().EndsWith("customadminpages.aspx"))
        {
            tabs.SelectedIndex = 1;
        }
    }
}
